From 9bea076291be160f0ae639180336c9bd82e7b1a6 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 28 Jun 2010 16:27:56 +0100 Subject: [PATCH] xentrace: restrict trace buffer MFNs Since they're being passed to Dom0 using an array of uint32_t, they must be representable as 32-bit quantities, and hence the buffer allocation must specify an upper address boundary. Signed-off-by: Jan Beulich Acked-by: George Dunlap --- xen/common/trace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/common/trace.c b/xen/common/trace.c index 132849ac96..9884f6ad6e 100644 --- a/xen/common/trace.c +++ b/xen/common/trace.c @@ -130,7 +130,8 @@ static int alloc_trace_bufs(void) char *rawbuf; struct t_buf *buf; - if ( (rawbuf = alloc_xenheap_pages(order, 0)) == NULL ) + if ( (rawbuf = alloc_xenheap_pages( + order, MEMF_bits(32 + PAGE_SHIFT))) == NULL ) { printk("Xen trace buffers: memory allocation failed\n"); opt_tbuf_size = 0; -- 2.30.2